package com.ojoin.trade.common.web.dao.impl;

import com.ojoin.trade.common.exception.DaoException;
import com.ojoin.trade.common.web.dao.NotificationTemplateDao;
import com.ojoin.trade.common.web.domain.NotificationTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class NotificationTemplateDaoImpl  extends BaseDaoImpl<NotificationTemplate> implements NotificationTemplateDao{

   public NotificationTemplate findByName(String name){
	   String mapMethodName = new Exception().getStackTrace()[0].getMethodName(); 
	   NotificationTemplate ret;
		try {
			ret = this.sqlSessionTemplate.selectOne(getSqlName(mapMethodName),name);
		} catch (Exception e) {
			throw new DaoException(String.format("语句：%s",getSqlName(mapMethodName)), e);
		}
	return ret;
   }
}
